<template>

  <div>
    <!--    -->
    <div style="display: flex;gap: 50px;">
      <printPage></printPage>

      <div style="padding-top: 124px">
        <!-- 打印区域     -->
      </div>
    </div>

    <button @click="print">模板方式打印</button>
    <lodop ref="lodopIframe2ref"></lodop>
  </div>
</template>

<script setup>
import printPage from './德辰老模板.vue';


import {onMounted, ref} from 'vue'
const lodopIframe2ref = ref(null)
const print = ()=>{
  lodopIframe2ref.value.demoPrint(callback, 1)
}


const callback = (LODOP)=>{
  let html = document.getElementById('order-map').outerHTML
  LODOP.SET_PRINT_PAGESIZE(1, 760, 1300, '')  //纸张设置为76mm*130mm
  // LODOP.ADD_PRINT_BARCODE(45, 20,'65mm', '10mm', "128A", )
  // LODOP.ADD_PRINT_BARCODE('76mm', '15mm','50mm', '16mm', "128Auto", item.value['快递单号二'])
  LODOP.ADD_PRINT_HTM(2,2, 300,600,html);
  LODOP.NEWPAGEA();
}

 
</script>